{include file="public/head"}

<body>
<div id="wrapper">
    {include file="public/menu"}

    <div id="page-wrapper" class="gray-bg dashbard-1">
        {include file="public/nav"}
        <div class="row wrapper border-bottom white-bg page-heading">
            <div class="col-lg-10">
                <h2>登录记录</h2>
                <ol class="breadcrumb">
                    <li>
                        <a href="{:url('Index/index')}">主页</a>
                    </li>
                    <li>
                        <a>维护</a>
                    </li>
                    <li>
                        <strong>登录记录</strong>
                    </li>
                </ol>
            </div>
            <div class="col-lg-2">

            </div>
        </div>
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>会员/管理员登录记录</h5>
                            <div class="ibox-tools">
                                <small>共 {$Count} 条</small>
                            </div>
                        </div>

                        <div class="ibox-content">
                            <div class="row">
                                <div class="col-sm-3">
                                    <div class="input-group">
<!--                                        <a href="javascript:;" onclick="level_add('添加等级','{:url("Level/LevelAdd")}','800','378')" class="btn btn-sm btn-primary"> 添加等级</a>-->
                                    </div>
                                </div>
                            </div>
                            <div class="table-responsive">
                                <table class="table table-hover">
                                    <thead>
                                    <tr>
                                        <th>#</th>
                                        <th>登录用户</th>
                                        <th>IP</th>
                                        <th>访问时间</th>
                                        <th>登录类型</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    {volist name="UserList" id="v" key="num"}
                                    <tr>
                                        <td>{$key+1}</td>
                                        <td>{$v.name}</td>
                                        <td>{$v.ip}</td>
                                        <td>{$v.time}</td>
                                        <td>{if condition="$v.type eq 1"}后台登录{elseif condition="$v.type eq 2"}前台登录{else/}非法登录{/if}</td>
                                        
                                    </tr>
                                    {/volist}
                                    </tbody>
                                </table>
                            </div>
                            <div class="row" style="text-align: center">
                                {$Page}
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
        {include file="public/foot"}
    </div>
</div>
</div>

{include file="public/footer"}

<script>

    
    /*等级-删除*/
    function level_del(obj,id){
        layer.confirm('确认要删除吗？',function(index){
            $.ajax({
                type:"post",
                url:"{:url('Maintain/logindelete')}",
                data:{
                    id:id,
                },
                dataType:"json",
                success:function(data){
                    if(data.status == 1){
                        layer.msg(data.message,{icon: 6,time:1500},function () {
                            window.location.reload();
                        });
                    }else{
                        layer.msg(data.message,{icon: 5,time:1500});
                    }
                }
            });
        });
    }
</script>
</body>

</html>
